package main

import (
	"os"
	"fmt"
	"path/filepath"
)

func t_fs()  {
	p, _ := os.Readlink("./b")
	println(p)

	println(filepath.Dir(p)) //返回p的目录
}

const (
	ERR_MASTER_ADD_RESOURCE = 30000 + iota
	ERR_MASTER_DEL_RESOURCE
	ERR_MASTER_QRY_RESOURCE
	ERR_MASTER_MIGRATE_CONTAINER
	ERR_MASTER_MIGRATE_MACHINE
	ERR_MASTER_CREATE_CLUSTER
	ERR_MASTER_JOB_STATUS
	ERR_MASTER_CHG_PASSWD
	ERR_MASTER_INFO_CLUSTER
	ERR_MASTER_DEL_CLUSTER
	ERR_MASTER_LIST_CLUSTER
	ERR_MASTER_RESIZE_CLUSTER
	ERR_MASTER_BACKUP_CLUSTER
	ERR_MASTER_HOTBACKUP_CLUSTER
	ERR_MASTER_QRY_BACKUP_CLUSTER
	ERR_MASTER_CHK_RESTORE_CLUSTER
	ERR_MASTER_RESTORE_CLUSTER
	ERR_MASTER_EXCHANG_CLUSTER
	ERR_MASTER_IOSLATION_CLUSTER
	ERR_MASTER_ADD_CONTAINER
	ERR_MASTER_DEL_CONTAINER
	ERR_MASTER_ADD_REPLICATE
	ERR_MASTER_DEL_REPLICATE
	ERR_MASTER_QRY_OPLOG
	ERR_MASTER_CHG_ETCD_ROUTE
	ERR_MASTER_SYNC_ROUTE
	ERR_MASTER_SHOW_DB
	ERR_MASTER_SHOW_COLLS
	ERR_MASTER_CREATE_USER
	ERR_MASTER_QRY_USER
	ERR_MASTER_DEL_USER
	ERR_MASTER_SET_AUTH
	ERR_MASTER_NOT_PRIMARY
	ERR_MASTER_CREATE_TABLE
	ERR_MASTER_DROP_TABLE
	ERR_MASTER_DROP_DATABASE
	ERR_MASTER_MIGRATE_CHUNK
	ERR_MASTER_PARAM
	ERR_MASTER_CHG_MIGRATE
	ERR_MASTER_ENSURE_INDEX
	ERR_MASTER_DROP_INDEX
	ERR_MASTER_DROP_INDEX_NAME
	ERR_MASTER_MIGRATE_CLEAN
	ERR_MASTER_GET_MIGRATE_STATUS
	ERR_MASTER_GET_MIGRATE_GROUP
	ERR_MASTER_IS_TABLE_IN_MIGRATING
	ERR_MASTER_GEN_BALANCE_TASK
	ERR_MASTER_BALANCE
	ERR_MASTER_UPDATE_ES_ROUTE
	ERR_MASTER_GET_CLUSTER_ROUTES
	ERR_MASTER_GET_INTERSECT_JOBS
	ERR_MASTER_GET_CLUSTER_L5
	ERR_MASTER_UPGRADE_CLUSTER_MODULE
	ERR_MASTER_SET_PROXYNOTIFYINFO
	ERR_MASTER_GET_PROXYNOTIFYINFO
	ERR_MASTER_GETCLUSTERBAN
	ERR_MASTER_SET_VERSIONINFO
	ERR_MASTER_GET_VERSIONINFO
	ERR_MASTER_RESIZEOPLOG
	ERR_MASTER_SETCLUSTERMAXCONNS
	ERR_MASTER_RESTART_CONTAINER
	ERR_MASTER_GET_SLOW_QUERY
	ERR_MASTER_QRY_SLOW_INFO
	ERR_MASTER_GET_REGIONBACKUPINFO
	ERR_MASTER_SET_REGIONBACKUPINFO
	ERR_MASTER_GET_CLUSTERBACKUPINFO
	ERR_MASTER_SET_CLUSTERBACKUPINFO
	ERR_MASTER_DEL_CLUSTERBACKUPINFO
	ERR_MASTER_SET_CLUSTERAUTHRULES
	ERR_MASTER_GET_CLUSTERAUTHRULES
	ERR_MASTER_GET_AUDITRESULT
	ERR_MASTER_GET_ENCRYPT_KEY
	ERR_MASTER_SET_CLUSTERSYNC
	ERR_MASTER_QRY_CLUSTERSYNC_DELAY
	ERR_MASTER_DETACH_CLUSTERSYNC
	ERR_MASTER_SET_PROXY_CONNS
	ERR_MASTER_SET_CLUSTERBASEINFO
	ERR_MASTER_QUERY_PROXY_CONNECTION
	ERR_MASTER_LIST_RESTORE_TS
	ERR_MASTER_CHECK_HOTBACKUP_SUPPORT
	ERR_MASTER_VOTE_NEW_PRIMARY
	ERR_MASTER_RUN_COMMON_CMD
	ERR_MASTER_GET_IP_CONN_INFO
)

func main() {
	fmt.Printf("%d", ERR_MASTER_GET_IP_CONN_INFO)
	var err error = nil
	fmt.Println(err.Error())
	t_fs()
}
